package com.ewzj.bigdata.app.config.netmodel

import com.ewzj.bigdata.mvp.model.rspbean.*
import io.reactivex.Observable
import io.rx_cache2.DynamicKey
import io.rx_cache2.EvictProvider
import io.rx_cache2.LifeCache
import java.util.concurrent.TimeUnit

/**
 * author:zhangjing
 * 作用:
 * return:
 */
interface CommonCache {
    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
    fun videoList(oUsers: Observable<VideosData>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<VideosData>


    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun infoList(oUsers: Observable<InfosData>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<InfosData>


    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun recinfoList(oUsers: Observable<InfosData>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<InfosData>

    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun rechourseList(oUsers: Observable<HomeBean>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<HomeBean>


    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun hourseList(oUsers: Observable<HomeBean>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<HomeBean>


    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun decCompanyList(oUsers: Observable<DecCompanysBeans>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<DecCompanysBeans>


    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun homedatalist(oUsers: Observable<List<Databean>>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<List<Databean>>

    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun decBanner(oUsers: Observable<List<DecBean>>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<List<DecBean>>

    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun decPic(oUsers: Observable<List<DecPicBean>>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<List<DecPicBean>>

    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun decbannerPic(oUsers: Observable<List<DecPicBean>>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<List<DecPicBean>>

    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun tabvideolist(oUsers: Observable<VideosData>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<VideosData>

    //缓存房源类型
    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun hoursetypelist(oUsers: Observable<List<HourseType>>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<List<HourseType>>

    //首页v3缓存
    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun homev3list(oUsers: Observable<RspHomeData>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<RspHomeData>

    //原创新闻的缓存
    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun orginTopicV3(oUsers: Observable<List<RspOriginBean>>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<List<RspOriginBean>>

    //城市列表
    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun cityList(oUsers: Observable<CityBean>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<CityBean>

    //城市列表
    @LifeCache(duration = 10, timeUnit = TimeUnit.DAYS)
     fun AreaList(oUsers: Observable<List<HomeBean>>, idLastUserQueried: DynamicKey, evictProvider: EvictProvider): Observable<List<HomeBean>>


}